package com.igeek.clud_system.controller;

import com.igeek.clud_system.entity.ClubNews;
import com.igeek.clud_system.service.NewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class NewsController {
	@Autowired
	private NewsService newsService;
	@GetMapping("getNews")
	public List<ClubNews> getNews(){
		return newsService.getNews();
	}
}
